package pers.luofei.http.client.services;

import com.alibaba.fastjson.JSON;
import pers.luofei.http.client.annotations.*;
import pers.luofei.http.client.core.ContentType;

import java.util.Map;

/**
 * @author luofei[fei12990@foxmail.com]
 * @date 2017/9/12
 */
public interface SimpleService {

    Object get0(@RequestUrl String url);

    Object get0(@RequestUrl String url, @RequestHeaders Map<String, String> headers);

    JSON get(@RequestUrl String url);

    JSON get(@RequestUrl String url, @RequestHeaders Map<String, String> headers);

    @POST
    Object post0(@RequestUrl String url);

    @POST
    JSON post(@RequestUrl String url);

    @POST
    Object post0(@RequestUrl String url, @RequestParam Map<String, String> params);

    @POST
    @RequestContentType(ContentType.JSON)
    Object post0(@RequestUrl String url, @RequestParam Object body);

    @POST
    Object post0(@RequestUrl String url, @RequestParam Map<String, String> params, @RequestHeaders Map<String, String> headers);

    @POST
    @RequestContentType(ContentType.JSON)
    Object post0(@RequestUrl String url, @RequestParam Object body, @RequestHeaders Map<String, String> headers);

    @POST
    JSON post(@RequestUrl String url, @RequestParam Map<String, String> params);

    @POST
    @RequestContentType(ContentType.JSON)
    JSON post(@RequestUrl String url, @RequestParam Object body);

    @POST
    JSON post(@RequestUrl String url, @RequestParam Map<String, String> params, @RequestHeaders Map<String, String> headers);

    @POST
    @RequestContentType(ContentType.JSON)
    JSON post(@RequestUrl String url, @RequestParam Object body, @RequestHeaders Map<String, String> headers);

    @PUT
    Object put0(@RequestUrl String url);

    @PUT
    JSON put(@RequestUrl String url);

    @PUT
    Object put0(@RequestUrl String url, @RequestParam Map<String, String> params);

    @PUT
    @RequestContentType(ContentType.JSON)
    Object put0(@RequestUrl String url, @RequestParam Object body);

    @PUT
    Object put0(@RequestUrl String url, @RequestParam Map<String, String> params, @RequestHeaders Map<String, String> headers);

    @PUT
    @RequestContentType(ContentType.JSON)
    Object put0(@RequestUrl String url, @RequestParam Object body, @RequestHeaders Map<String, String> headers);

    @PUT
    JSON put(@RequestUrl String url, @RequestParam Map<String, String> params);

    @PUT
    @RequestContentType(ContentType.JSON)
    JSON put(@RequestUrl String url, @RequestParam Object body);

    @PUT
    JSON put(@RequestUrl String url, @RequestParam Map<String, String> params, @RequestHeaders Map<String, String> headers);

    @PUT
    @RequestContentType(ContentType.JSON)
    JSON put(@RequestUrl String url, @RequestParam Object body, @RequestHeaders Map<String, String> headers);

    @DELETE
    Object delete0(@RequestUrl String url);

    @DELETE
    Object delete0(@RequestUrl String url, @RequestHeaders Map<String, String> headers);

    @DELETE
    JSON delete(@RequestUrl String url);

    @DELETE
    JSON delete(@RequestUrl String url, @RequestHeaders Map<String, String> headers);
}
